﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


// 本文件定义了用于声明过期、废弃的接口类和接口函数的宏

#pragma once

#if defined(GCMP_IGNORE_DEPRECATED)

#define GCMP_DEPRECATED(msg)

#else

#if defined(_MSC_VER)
#define GCMP_DEPRECATED(msg) __declspec(deprecated(msg))
#else
#define GCMP_DEPRECATED(msg) __attribute__((deprecated(msg)))
#endif

#endif

// data日期的格式只允许是：Year/Month/Day(格式：d{4}/d{2}/d{2}}, 其中Month=(current month + 2) , Day=1(两位）。例如，今天是5月11号，时间应该填:2020/07/01
// 否则code_review会报错阻止提交。未按照格式写又强行提交者发现将通过邮件发送所有人通知

// 废弃的类，date 之后会被删除
#define GCMP_DEPRECATED_CLASS(date) GCMP_DEPRECATED("This class was marked as deprecated since " #date " and will be removed soon. Please do not use it.")

// 废弃的接口，date 之后会被删除
#define GCMP_DEPRECATED_API(date) GCMP_DEPRECATED("This function was marked as deprecated since " #date " and will be removed soon. Please do not use it.")

// 过期的接口，date 之后会被删除，请使用 ... 中给出的新接口替换
#define GCMP_OBSOLETE_API(date, ...) GCMP_DEPRECATED("This function was marked as obsoleted since " #date " and will be removed soon. Please use " #__VA_ARGS__ " instead.")


